﻿using DailyApp.WPF.ViewModels;
using MaterialDesignThemes.Wpf;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace DailyApp.WPF.Views
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            btnMin.Click += (s, e) => { WindowState = WindowState.Minimized; };
            btnMax.Click += (s, e) => { WindowState=(WindowState == WindowState.Maximized )? WindowState.Normal : WindowState.Maximized; };
            btnClose.Click += (s, e) => { Environment.Exit(0); };
            //Loaded += (s, e) => {
            //    var dc = (MainWindowViewModel)DataContext;
            //    dc.NavigateCommand.Execute(dc.MenuList.First());
            //};
        }

        private void lbMenu_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            drawerHost.IsLeftDrawerOpen = false;
        }
    }
}